package grade;

import static org.junit.Assert.assertEquals;

import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.CsvSource;


public class GradeTestTest {

	
//     @Test
//     @DisplayName("When numberOfPerson greater than 2000,return 1")
//     void when_numberOfPerson_greater_than_2000_return_1() {
//    	 Grade grade = new Grade();
//    	 
//    	 int result = grade.grade(2020);
//    	 
//    	 assertEquals(1,result);
//     }
    
	 @ParameterizedTest
     @CsvSource({"2020, 1", "1990, 2","1200, 3", "700, 4", "400, 5" ,"100, 6", "40, 7"})
     void test(int numberOfPerson, int expectedLevel) {
    	 Grade grade = new Grade();
    	 
    	 int result = grade.grade(numberOfPerson);
    	 
    	 assertEquals(expectedLevel, result);
     }

}
